<div class="container main" ng-controller="ProjectListCtrl">
    <!-- 顶部功能区 -->
    <div class="row">
        <div class="panel panel-default">
            <!-- Default panel contents -->
            <div class="panel-heading">
                <div class="text-center"><strong>{[moduleTitle|uppercase]}</strong></div>
                <div class="row">
                    <div class="col-md-4">
                        <span class="btn-group">
                            <button data-toggle="dropdown" class="btn btn-default dropdown-toggle">
                                <strong>Actions</strong>&nbsp;&nbsp;<i class="caret"></i>
                            </button>

                            <ul class="dropdown-menu">
                                <li>
                                    <a onclick="" href="javascript:void(0);">Export</a>
                                </li>
                            </ul>

                        </span>
                    </div>
                    <div class="col-md-8">
                        <form name="form_query" ng-submit="query()" class="form-inline pull-right">(Demo)
                            <div class="form-group">
                                <label class="sr-only"></label>
                                <select class="form-control" name="limit" ng-model="parameters.status">
                                    <option value="all">All</option>
                                    <option value="complete">Complete</option>
                                    <option value="in_progress">In Progress</option>
                                    <option value="delayed">Delayed</option>
                                    <option value="failed">Failed</option>
                                </select>
                            </div>

                            <div class="form-group">
                                <label class="sr-only"></label>
                                <input type="text" class="form-control" ng-model="parameters.query" placeholder="Keywords" />
                            </div>

                            <div class="form-group">
                                <label class="sr-only"></label>
                                <select class="form-control" name="limit" ng-model="parameters.limit">
                                    <option value="20">20</option>
                                    <option value="30">30</option>
                                    <option value="50">50</option>
                                    <option value="100">100</option>
                                    <option value="0">Unlimited</option>
                                </select>
                            </div>

                            <button type="submit" class="btn btn-info">
                                <i class="glyphicon glyphicon-search icon-white"></i> Search
                            </button>
                        </form>
                    </div>
                </div>
            </div>

            <!-- Table -->
            <div ng-show="objects.length == 0" class="rounded_corners no_result">
                <p>No Projects found.</p>
            </div>
            <table class="table table-striped table-bordered table-condensed table-hover" ng-show="objects.length > 0" ts-wrapper>
                <thead>
                    <tr>
                        <th>#</th>
                        <th>Total</th>
                        <th>Done</th>
                        <th>In Progress</th>
                        <th>Delay</th>
                        <th>Failed</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="obj in objects" ts-repeat="ts-repeat">
                        <td class="text-center">
                            <a href="javascript:void(0)" ng-click="openProjectDetail(obj.uuid)">
                                {[ obj.slug ]}
                            </a>
                        </td>
                        <td class="text-center">
                            <a href="javascript:void(0)" class="label label-default" ng-click="openProjectDetail(obj.uuid, 'all')">
                                {[ obj.summary.len ]}
                            </a>
                        </td>
                        <td class="text-center">
                            <a href="javascript:void(0)" class="label label-success" ng-click="openProjectDetail(obj.uuid, 'complete')">
                                {[ obj.summary.complete ]}
                            </a>
                        </td>
                        <td class="text-center">
                            <a href="javascript:void(0)" class="label label-info" ng-click="openProjectDetail(obj.uuid, 'in_progress')">
                                {[ obj.summary.in_progress ]}
                            </a>
                        </td>
                        <td class="text-center">
                            <a href="javascript:void(0)" class="label label-warning" ng-click="openProjectDetail(obj.uuid, 'delayed')">
                                {[ obj.summary.delayed ]}
                            </a>
                        </td>
                        <td class="text-center">
                            <a href="javascript:void(0)" class="label label-important" ng-click="openProjectDetail(obj.uuid, 'failed')">
                                {[ obj.summary.failed ]}
                            </a>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div ng-include="'/static/js/views/components/pager.html'" style="display: inline;"></div>

</div>